def group_7(tree):
    dict_group_7 = {"管理机构": "", "内部建档号": "", "所属家庭": "", "与户主关系": "", "责任医生": "", "家庭保健员": "", "成为保健员日期": "", "备注": ""}
    mng_org = tree.xpath('//input[@name="EHRBASE.mngOrgName"]/@value')
    mng_org = mng_org[0] if mng_org and mng_org[0].strip() else None
    dict_group_7["管理机构"] = mng_org
    # 内部建档号
    inner_code = tree.xpath('//input[@id="EHRBASE.innerCode"]/@value')
    inner_code = inner_code[0] if inner_code and inner_code[0].strip() else None

    dict_group_7["内部建档号"] = "'"+str(inner_code)
    if dict_group_7["内部建档号"] == "'None":
        dict_group_7["内部建档号"] =  None


    # 所属家庭
    family_name = tree.xpath('//input[@id="familyName"]/@value')
    family_name = family_name[0] if family_name and family_name[0].strip() else None
    dict_group_7["所属家庭"] = family_name

    # 与户主关系
    relationship = tree.xpath('//select[@id="hhRelationship"]/option[@selected]/text()')
    relationship = relationship[0].strip() if relationship else None
    dict_group_7["与户主关系"] = relationship

    # 责任医生
    duty_doctor = tree.xpath('//input[@id="dutyDoctor"]/@value')
    duty_doctor = duty_doctor[0] if duty_doctor and duty_doctor[0].strip() else None
    dict_group_7["责任医生"] = duty_doctor

    # 家庭保健员
    is_family_health_care = "是" if tree.xpath(
        '//input[@name="EHRBASE.isFamilyHealthCare" and @checked and @value="1"]') else "否"
    dict_group_7["家庭保健员"] = is_family_health_care

    # 成为保健员日期
    health_care_date = tree.xpath('//input[@id="isFamilyHealthCareDate"]/@value')
    health_care_date = health_care_date[0] if health_care_date and health_care_date[0].strip() else None
    dict_group_7["成为保健员日期"] = health_care_date

    # 备注
    comments = tree.xpath('//input[@id="EHRBASE.comments"]/@value')
    comments = comments[0] if comments and comments[0].strip() else None
    dict_group_7["备注"] = comments
    print("问题不在7")
    return dict_group_7